package router

import (
	"github.com/gin-gonic/gin"
	"order_bff/controller"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	router.POST("/create/order", controller.CreateOrder)   //创建订单
	router.POST("/create/orders", controller.CreateOrders) //创建订单
	router.GET("/order/list", controller.OrderList)        //订单列表
	router.POST("/delete/order", controller.DeleteOrder)   //删除订单
	router.POST("/alipay", controller.Alipay)              //生成支付链接
	router.GET("/return", controller.Return)               //支付成功 订单详情
	router.Any("/re_back", controller.ReBack)              //支付回调 修改订单信息
	return router
}
